package com.bwie.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bwie.pojo.Order;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.ShoppingCar;
import com.bwie.mapper.ShoppingCarMapper;
import com.bwie.service.ShoppingCarService;

import javax.swing.*;

@Service
public class ShoppingCarServiceImpl extends ServiceImpl<ShoppingCarMapper, ShoppingCar> implements ShoppingCarService{

    @Autowired
    ShoppingCarMapper shoppingCarMapper;
    @Override
    public R getCarList(PageInfoVo pageInfoVo) {

        Page<ShoppingCar> page = new Page<>(pageInfoVo.getPageNum(), pageInfoVo.getPageSize());
        Page<ShoppingCar> shoppingCarPage = shoppingCarMapper.selectPage(page, null);
        return R.OK(shoppingCarPage);
    }
}
